<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class LoggerFilter | Apache log4php</title>

	<script type="text/javascript" src="resources/combined.js?238209907"></script>
	<script type="text/javascript" src="elementlist.js?4055067042"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

	<script type="text/javascript">
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', "UA-26177991-1"]);
		_gaq.push(['_trackPageview']);

		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
		})();
	</script>
</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li class="active"><a href="package-log4php.html">log4php<span></span></a>
						<ul>
				<li><a href="package-log4php.appenders.html">appenders</a>
						</li>
				<li><a href="package-log4php.configurators.html">configurators</a>
						</li>
				<li><a href="package-log4php.filters.html">filters</a>
						</li>
				<li><a href="package-log4php.helpers.html">helpers</a>
						</li>
				<li><a href="package-log4php.layouts.html">layouts</a>
						</li>
				<li><a href="package-log4php.pattern.html">pattern</a>
						</li>
				<li><a href="package-log4php.renderers.html">renderers</a>
						</li>
							</ul></li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-Logger.html">Logger</a></li>
				<li><a href="class-LoggerAppender.html">LoggerAppender</a></li>
				<li><a href="class-LoggerAppenderPool.html">LoggerAppenderPool</a></li>
				<li><a href="class-LoggerAutoloader.html">LoggerAutoloader</a></li>
				<li><a href="class-LoggerConfigurable.html">LoggerConfigurable</a></li>
				<li><a href="class-LoggerConfiguratorDefault.html">LoggerConfiguratorDefault</a></li>
				<li class="active"><a href="class-LoggerFilter.html">LoggerFilter</a></li>
				<li><a href="class-LoggerHierarchy.html">LoggerHierarchy</a></li>
				<li><a href="class-LoggerLayout.html">LoggerLayout</a></li>
				<li><a href="class-LoggerLevel.html">LoggerLevel</a></li>
				<li><a href="class-LoggerLocationInfo.html">LoggerLocationInfo</a></li>
				<li><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></li>
				<li><a href="class-LoggerMDC.html">LoggerMDC</a></li>
				<li><a href="class-LoggerNDC.html">LoggerNDC</a></li>
				<li><a href="class-LoggerReflectionUtils.html">LoggerReflectionUtils</a></li>
				<li><a href="class-LoggerRoot.html">LoggerRoot</a></li>
				<li><a href="class-LoggerThrowableInformation.html">LoggerThrowableInformation</a></li>
			</ul>

			<h3>Interfaces</h3>
			<ul>
				<li><a href="class-LoggerConfigurator.html">LoggerConfigurator</a></li>
			</ul>


			<h3>Exceptions</h3>
			<ul>
				<li><a href="class-LoggerException.html">LoggerException</a></li>
			</ul>


		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-log4php.html" title="Summary of log4php"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class LoggerFilter</h1>


	<div class="description">
	
<p>Users should extend this class to implement customized logging event
filtering. Note that LoggerCategory and <code><a href="class-LoggerAppender.html">LoggerAppender</a></code>, the
parent class of all standard appenders, have built-in filtering rules. It is
suggested that you first use and understand the built-in rules before rushing to
write your own custom filters.</p>

<p>This abstract class assumes and also imposes that filters be organized in a
linear chain. The #decide decide(LoggerLoggingEvent) method of each
filter is called sequentially, in the order of their addition to the chain.</p>

<p>The <code><a href="class-LoggerFilter.html#_decide">LoggerFilter::decide()</a></code> method must return one of the integer constants <code><a href="class-LoggerFilter.html#DENY">LoggerFilter::<b>DENY</b></a></code>, <code><a href="class-LoggerFilter.html#NEUTRAL">LoggerFilter::<b>NEUTRAL</b></a></code> or <code><a href="class-LoggerFilter.html#ACCEPT">LoggerFilter::<b>ACCEPT</b></a></code>.</p>

<p>If the value <code><a href="class-LoggerFilter.html#DENY">LoggerFilter::<b>DENY</b></a></code> is returned, then the log event is
dropped immediately without consulting with the remaining filters.</p>

<p>If the value <code><a href="class-LoggerFilter.html#NEUTRAL">LoggerFilter::<b>NEUTRAL</b></a></code> is returned, then the next filter
in the chain is consulted. If there are no more filters in the chain, then the
log event is logged. Thus, in the presence of no filters, the default behaviour
is to log all logging events.</p>

<p>If the value <code><a href="class-LoggerFilter.html#ACCEPT">LoggerFilter::<b>ACCEPT</b></a></code> is returned, then the log event is
logged without consulting the remaining filters.</p>

<p>The philosophy of log4php filters is largely inspired from the Linux
ipchains.</p>

	</div>

	<dl class="tree">
		<dd style="padding-left:0px">
			<a href="class-LoggerConfigurable.html"><span>LoggerConfigurable</span></a>
			
			
			
		</dd>
		<dd style="padding-left:30px">
			<img src="resources/inherit.png" alt="Extended by" />
<b><span>LoggerFilter</span></b>			
			
			
		</dd>
	</dl>


	<div>
		<h4>Direct known subclasses</h4>
			<a href="class-LoggerFilterDenyAll.html">LoggerFilterDenyAll</a>, 
			<a href="class-LoggerFilterLevelMatch.html">LoggerFilterLevelMatch</a>, 
			<a href="class-LoggerFilterLevelRange.html">LoggerFilterLevelRange</a>, 
			<a href="class-LoggerFilterStringMatch.html">LoggerFilterStringMatch</a>
	</div>






	<div class="info">
		<b>Abstract</b><br />
		
		
		<b>Package:</b> <a href="package-log4php.html">log4php</a><br />

				<b>Version:</b>
				$Revision: 1213283 $<br />
		<b>Located at</b> <a href="source-class-LoggerFilter.html#21-126" title="Go to source code">LoggerFilter.php</a><br />
	</div>



	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="activateOptions" id="_activateOptions">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_activateOptions">#</a>
		<code><a href="source-class-LoggerFilter.html#81-86" title="Go to source code">activateOptions</a>( )</code>

		<div class="description short">
			
<p>Usually filters options become active when set. We provide a default
do-nothing implementation for convenience.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Usually filters options become active when set. We provide a default
do-nothing implementation for convenience.</p>








		</div>
		</div></td>
	</tr>
	<tr data-order="decide" id="_decide">

		<td class="attributes"><code>
			 public 
			integer
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_decide">#</a>
		<code><a href="source-class-LoggerFilter.html#88-101" title="Go to source code">decide</a>( <span><code><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></code> <var>$event</var></span> )</code>

		<div class="description short">
			Decide what to do.
<p>If the decision is <code><a href="class-LoggerFilter.html#DENY">LoggerFilter::<b>DENY</b></a></code>, then the event will be
dropped. If the decision is <code><a href="class-LoggerFilter.html#NEUTRAL">LoggerFilter::<b>NEUTRAL</b></a></code>, then the next filter,
if any, will be invoked. If the decision is <code><a href="class-LoggerFilter.html#ACCEPT">LoggerFilter::<b>ACCEPT</b></a></code> then
the event will be logged without consulting with other filters in the chain.</p>

		</div>

		<div class="description detailed hidden">
			Decide what to do.
<p>If the decision is <code><a href="class-LoggerFilter.html#DENY">LoggerFilter::<b>DENY</b></a></code>, then the event will be
dropped. If the decision is <code><a href="class-LoggerFilter.html#NEUTRAL">LoggerFilter::<b>NEUTRAL</b></a></code>, then the next filter,
if any, will be invoked. If the decision is <code><a href="class-LoggerFilter.html#ACCEPT">LoggerFilter::<b>ACCEPT</b></a></code> then
the event will be logged without consulting with other filters in the chain.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$event</var></dt>
					<dd><code><code><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></code></code><br>$event The <code><a href="class-LoggerLoggingEvent.html">LoggerLoggingEvent</a></code> to decide upon.</dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>integer</code><br><code><a href="class-LoggerFilter.html#NEUTRAL">LoggerFilter::<b>NEUTRAL</b></a></code> or <code><a href="class-LoggerFilter.html#DENY">LoggerFilter::<b>DENY</b></a></code>|<code><a href="class-LoggerFilter.html#ACCEPT">LoggerFilter::<b>ACCEPT</b></a></code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="addNext" id="_addNext">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_addNext">#</a>
		<code><a href="source-class-LoggerFilter.html#103-116" title="Go to source code">addNext</a>( <span>mixed <var>$filter</var></span> )</code>

		<div class="description short">
			
<p>Adds a new filter to the filter chain this filter is a part of. If this
filter has already and follow up filter, the param filter is passed on until it
is the last filter in chain.</p>

		</div>

		<div class="description detailed hidden">
			
<p>Adds a new filter to the filter chain this filter is a part of. If this
filter has already and follow up filter, the param filter is passed on until it
is the last filter in chain.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$filter</var></dt>
					<dd><code>mixed</code><br>$filter - the filter to add to this chain</dd>
				</dl></div>





		</div>
		</div></td>
	</tr>
	<tr data-order="getNext" id="_getNext">

		<td class="attributes"><code>
			 public 
			the
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_getNext">#</a>
		<code><a href="source-class-LoggerFilter.html#118-124" title="Go to source code">getNext</a>( )</code>

		<div class="description short">
			
<p>Returns the next filter in this chain</p>

		</div>

		<div class="description detailed hidden">
			
<p>Returns the next filter in this chain</p>




				<h4>Returns</h4>
				<div class="list">
					<code>the</code><br>next filter<br />
				</div>




		</div>
		</div></td>
	</tr>
	</table>

	<table class="summary inherited">
	<caption>Methods inherited from <a href="class-LoggerConfigurable.html#methods">LoggerConfigurable</a></caption>
	<tr>
		<td><code>
			<a href="class-LoggerConfigurable.html#_setBoolean">setBoolean()</a>, 
			<a href="class-LoggerConfigurable.html#_setFileSize">setFileSize()</a>, 
			<a href="class-LoggerConfigurable.html#_setInteger">setInteger()</a>, 
			<a href="class-LoggerConfigurable.html#_setLevel">setLevel()</a>, 
			<a href="class-LoggerConfigurable.html#_setNumeric">setNumeric()</a>, 
			<a href="class-LoggerConfigurable.html#_setPositiveInteger">setPositiveInteger()</a>, 
			<a href="class-LoggerConfigurable.html#_setString">setString()</a>, 
			<a href="class-LoggerConfigurable.html#_warn">warn()</a>
		</code></td>
	</tr>
	</table>







	<table class="summary" id="constants">
	<caption>Constants summary</caption>
	<tr data-order="ACCEPT" id="ACCEPT">

		<td class="attributes"><code>integer</code></td>
		<td class="name"><code>
				<a href="source-class-LoggerFilter.html#58-62" title="Go to source code"><b>ACCEPT</b></a>
		</code></td>
		<td class="value"><code><span class="php-num">1</span></code></td>
		<td class="description"><div>
			<a href="#ACCEPT" class="anchor">#</a>

			<div class="description short">
				
<p>The log event must be logged immediately without consulting with the
remaining filters, if any, in the chain.</p>

			</div>

			<div class="description detailed hidden">
				
<p>The log event must be logged immediately without consulting with the
remaining filters, if any, in the chain.</p>


			</div>
		</div></td>
	</tr>
	<tr data-order="NEUTRAL" id="NEUTRAL">

		<td class="attributes"><code>integer</code></td>
		<td class="name"><code>
				<a href="source-class-LoggerFilter.html#64-68" title="Go to source code"><b>NEUTRAL</b></a>
		</code></td>
		<td class="value"><code><span class="php-num">0</span></code></td>
		<td class="description"><div>
			<a href="#NEUTRAL" class="anchor">#</a>

			<div class="description short">
				
<p>This filter is neutral with respect to the log event. The remaining filters,
if any, should be consulted for a final decision.</p>

			</div>

			<div class="description detailed hidden">
				
<p>This filter is neutral with respect to the log event. The remaining filters,
if any, should be consulted for a final decision.</p>


			</div>
		</div></td>
	</tr>
	<tr data-order="DENY" id="DENY">

		<td class="attributes"><code>integer</code></td>
		<td class="name"><code>
				<a href="source-class-LoggerFilter.html#70-74" title="Go to source code"><b>DENY</b></a>
		</code></td>
		<td class="value"><code>-<span class="php-num">1</span></code></td>
		<td class="description"><div>
			<a href="#DENY" class="anchor">#</a>

			<div class="description short">
				
<p>The log event must be dropped immediately without consulting with the
remaining filters, if any, in the chain.</p>

			</div>

			<div class="description detailed hidden">
				
<p>The log event must be dropped immediately without consulting with the
remaining filters, if any, in the chain.</p>


			</div>
		</div></td>
	</tr>
	</table>




	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="next" id="$next">
		<td class="attributes"><code>
			protected  
			<code><a href="class-LoggerFilter.html">LoggerFilter</a></code>
		</code></td>

		<td class="name">
				<a href="source-class-LoggerFilter.html#76-79" title="Go to source code"><var>$next</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$next" class="anchor">#</a>

			<div class="description short">
				
<p>Points to the next <code><a href="class-LoggerFilter.html">LoggerFilter</a></code> in the filter chain.</p>

			</div>

			<div class="description detailed hidden">
				
<p>Points to the next <code><a href="class-LoggerFilter.html">LoggerFilter</a></code> in the filter chain.</p>


			</div>
		</div></td>
	</tr>
	</table>






</div>

	<div id="footer">
		Apache log4php API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
	</div>
</div>
</div>
</body>
</html>
